#include "dev_layout.h"

#define  LED1       HAL_PORT_B,HAL_Pin_0
#define  LED2       HAL_PORT_E,HAL_Pin_1
#define  LED3       HAL_PORT_B,HAL_Pin_14



void DeviceInit()
{
  // init cpu system clock
  dev_handle.cpu->systemclock();

  //led init
  dev_handle.led->init(LED1);
  dev_handle.led->init(LED2);
  dev_handle.led->init(LED3);

  dev_handle.serial->init(HAL_UART3,115200);

}


int main()
{ 
  DeviceInit();
  while(1)
  {
     dev_handle.cpu->delay_ms(500); 
     dev_handle.led->toggle(LED1);
     dev_handle.led->toggle(LED2);
     dev_handle.led->toggle(LED3);
     dev_handle.serial->send_str(HAL_UART3,"123456789\n");
  }
	
	return 0;   
}
